import { sdkRequest } from '@/utils/sdkReuqest'
import { productApi } from '@/config'

export function propertyTree(param) { // 查询字段tree列表
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/get_field_config_info_tree_list/v1`,
		param
	)
}

export function propertyList(param) { // 查询字段列表
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/get_field_config_info_list/v1`,
		param
	)
}

export function propertySeach(param) { // 查询字段列表
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/get_field_config_info_by_id/v1`,
		param
	)
}

export function propertyEdit(param) { // 编辑字段
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/edit_field_config_info/v1`,
		param
	)
}

export function propertyDelete(param) { // 删除字段
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/delete_field_config_info_by_id/v1`,
		param
	)
}

export function propertyAdd(param) { // 新增字段信息
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/add_field_config_info/v1`,
		param
	)
}

export function editStepNum(param) { // 编辑步骤顺序
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/edit_step_config_info/v1`,
		param
	)
}

export function getOriginalData(param) { // 获取原始数据
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/get_field_config_info_list/v1`,
		param
	)
}

export function uploadVisibility(param) { // 批量修改可见
	return sdkRequest(
		'POST',
		`/${productApi}/field_configuration/edit_field_visibility_by_ids/v1`,
		param
	)
}
